home *** CD-ROM | disk | FTP | other *** search
/ 9-Digit Zip Code Directory / 9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO / z4src.zip / SETJMP.H < prev    next >
C/C++ Source or Header  |  1993-11-23  |  918b  |  45 lines

  1. /***
  2. *setjmp.h - definitions/declarations for setjmp/longjmp routines
  3. *
  4. *   Copyright (c) 1985-1993, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *   This file defines the machine-dependent buffer used by
  8. *   setjmp/longjmp to save and restore the program state, and
  9. *   declarations for those routines.
  10. *   [ANSI/System V]
  11. *
  12. ****/
  13.  
  14. #ifndef _INC_SETJMP
  15.  
  16. #ifndef __cplusplus
  17.  
  18. #if (_MSC_VER <= 600)
  19. #define __cdecl     _cdecl
  20. #define __far       _far
  21. #endif 
  22.  
  23. /* define the buffer type for holding the state information */
  24.  
  25. #define _JBLEN  9  /* bp, di, si, sp, ret addr, ds */
  26.  
  27. #ifndef _JMP_BUF_DEFINED
  28. typedef  int  jmp_buf[_JBLEN];
  29. #define _JMP_BUF_DEFINED
  30. #endif 
  31.  
  32. /* ANSI requires setjmp be a macro */
  33.  
  34. #define setjmp  _setjmp
  35.  
  36. /* function prototypes */
  37.  
  38. int  __cdecl _setjmp(jmp_buf);
  39. void __cdecl longjmp(jmp_buf, int);
  40.  
  41. #endif 
  42.  
  43. #define _INC_SETJMP
  44. #endif 
  45.